Skip to content

fix: do not fetch a random inventory account when multiple inventory accounts exist (backport #57626) - #57631

Merged
rohitwaghchaure merged 4 commits into
version-15-hotfixfrom
mergify/bp/version-15-hotfix/pr-57626
Jul 31, 2026
Merged

fix: do not fetch a random inventory account when multiple inventory accounts exist (backport #57626)#57631
rohitwaghchaure merged 4 commits into
version-15-hotfixfrom
mergify/bp/version-15-hotfix/pr-57626

Conversation

@mergify

@mergify mergify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This is an automatic backport of pull request #57626 done by [Mergify](https://mergify.com).

…accounts exist (#57626)

(cherry picked from commit 386a4ac)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
@mergify
mergify Bot requested a review from rohitwaghchaure as a code owner July 30, 2026 14:14
@mergify mergify Bot added the conflicts label Jul 30, 2026
@mergify

mergify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of 386a4ac has failed:

On branch mergify/bp/version-15-hotfix/pr-57626
Your branch is up to date with 'origin/version-15-hotfix'.

You are currently cherry-picking commit 386a4ac1f0.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
	modified:   erpnext/stock/__init__.py
	modified:   erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py
	modified:   erpnext/stock/doctype/warehouse/test_warehouse.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

rohitwaghchaure and others added 3 commits July 30, 2026 22:52
Removed redundant test for valuation taxes in purchase receipt.
For asset purchase receipts or provisional accounting with perpetual
inventory disabled, GL entries do not use warehouse accounts. Building
the full warehouse account map in that case now throws when a company
has multiple inventory accounts and no default, breaking asset receipt
submission. Mirrors the gating on develop.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The conflict resolution kept the pre-backport copy of
test_valuation_taxes_lcv_repost_after_billing, which enables perpetual
inventory on _Test Company without configuring a default inventory
account. The test then failed on submit and leaked the perpetual
inventory flag, breaking every stock test that ran after it in the same
process. Restore the cherry-picked version from #57626.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rohitwaghchaure
rohitwaghchaure enabled auto-merge (squash) July 31, 2026 05:07
@rohitwaghchaure
rohitwaghchaure merged commit 972a990 into version-15-hotfix Jul 31, 2026
16 checks passed
@rohitwaghchaure
rohitwaghchaure deleted the mergify/bp/version-15-hotfix/pr-57626 branch July 31, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant